<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>oauth2client.multistore_file._MultiStore</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="oauth2client-module.html">Package&nbsp;oauth2client</a> ::
        <a href="oauth2client.multistore_file-module.html">Module&nbsp;multistore_file</a> ::
        Class&nbsp;_MultiStore
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="oauth2client.multistore_file._MultiStore-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class _MultiStore</h1><p class="nomargin-top"><span class="codelink"><a href="oauth2client.multistore_file-pysrc.html#_MultiStore">source&nbsp;code</a></span></p>
<center>
<center>  <map id="class_hierarchy_for__multistor" name="class_hierarchy_for__multistor">
<area shape="rect" href="oauth2client.multistore_file._MultiStore-class.html" title="_MultiStore" alt="" coords="5,5,93,32"/>
</map>
  <img src="class_hierarchy_for__multistor.gif" alt='' usemap="#class_hierarchy_for__multistor" ismap="ismap" class="graph-without-title" />
</center>
</center>
<hr />
<pre class="literalblock">
A file backed store for multiple credentials.

</pre>

<!-- ==================== NESTED CLASSES ==================== -->
<a name="section-NestedClasses"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Nested Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-NestedClasses"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="oauth2client.multistore_file._MultiStore._Storage-class.html" class="summary-name" onclick="show_private();">_Storage</a><br />
      A Storage object that knows how to read/write a single credential.
    </td>
  </tr>
</table>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="oauth2client.multistore_file._MultiStore-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">filename</span>,
        <span class="summary-sig-arg">warn_on_readonly</span>=<span class="summary-sig-default">True</span>)</span><br />
      Initialize the class.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.multistore_file-pysrc.html#_MultiStore.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="oauth2client.multistore_file._MultiStore-class.html#_create_file_if_needed" class="summary-sig-name" onclick="show_private();">_create_file_if_needed</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Create an empty file if necessary.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.multistore_file-pysrc.html#_MultiStore._create_file_if_needed">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_lock"></a><span class="summary-sig-name">_lock</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Lock the entire multistore.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.multistore_file-pysrc.html#_MultiStore._lock">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_unlock"></a><span class="summary-sig-name">_unlock</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Release the lock on the multistore.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.multistore_file-pysrc.html#_MultiStore._unlock">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="oauth2client.multistore_file._MultiStore-class.html#_locked_json_read" class="summary-sig-name" onclick="show_private();">_locked_json_read</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Get the raw content of the multistore file.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.multistore_file-pysrc.html#_MultiStore._locked_json_read">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="oauth2client.multistore_file._MultiStore-class.html#_locked_json_write" class="summary-sig-name" onclick="show_private();">_locked_json_write</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">data</span>)</span><br />
      Write a JSON serializable data structure to the multistore.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.multistore_file-pysrc.html#_MultiStore._locked_json_write">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="oauth2client.multistore_file._MultiStore-class.html#_refresh_data_cache" class="summary-sig-name" onclick="show_private();">_refresh_data_cache</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Refresh the contents of the multistore.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.multistore_file-pysrc.html#_MultiStore._refresh_data_cache">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="oauth2client.multistore_file._MultiStore-class.html#_decode_credential_from_json" class="summary-sig-name" onclick="show_private();">_decode_credential_from_json</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">cred_entry</span>)</span><br />
      Load a credential from our JSON serialization.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.multistore_file-pysrc.html#_MultiStore._decode_credential_from_json">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="oauth2client.multistore_file._MultiStore-class.html#_write" class="summary-sig-name" onclick="show_private();">_write</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Write the cached data back out.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.multistore_file-pysrc.html#_MultiStore._write">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="oauth2client.multistore_file._MultiStore-class.html#_get_credential" class="summary-sig-name" onclick="show_private();">_get_credential</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">client_id</span>,
        <span class="summary-sig-arg">user_agent</span>,
        <span class="summary-sig-arg">scope</span>)</span><br />
      Get a credential from the multistore.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.multistore_file-pysrc.html#_MultiStore._get_credential">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="oauth2client.multistore_file._MultiStore-class.html#_update_credential" class="summary-sig-name" onclick="show_private();">_update_credential</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">cred</span>,
        <span class="summary-sig-arg">scope</span>)</span><br />
      Update a credential and write the multistore.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.multistore_file-pysrc.html#_MultiStore._update_credential">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="oauth2client.multistore_file._MultiStore-class.html#_delete_credential" class="summary-sig-name" onclick="show_private();">_delete_credential</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">client_id</span>,
        <span class="summary-sig-arg">user_agent</span>,
        <span class="summary-sig-arg">scope</span>)</span><br />
      Delete a credential and write the multistore.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.multistore_file-pysrc.html#_MultiStore._delete_credential">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="oauth2client.multistore_file._MultiStore-class.html#_get_storage" class="summary-sig-name" onclick="show_private();">_get_storage</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">client_id</span>,
        <span class="summary-sig-arg">user_agent</span>,
        <span class="summary-sig-arg">scope</span>)</span><br />
      Get a Storage object to get/set a credential.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="oauth2client.multistore_file-pysrc.html#_MultiStore._get_storage">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__format__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__sizeof__</code>,
      <code>__str__</code>,
      <code>__subclasshook__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">filename</span>,
        <span class="sig-arg">warn_on_readonly</span>=<span class="sig-default">True</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="oauth2client.multistore_file-pysrc.html#_MultiStore.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Initialize the class.

This will create the file if necessary.

</pre>
  <dl class="fields">
    <dt>Decorators:</dt>
    <dd><ul class="nomargin-top">
        <li><code>@util.positional(2)</code></li>
    </ul></dd>
    <dt>Overrides:
        object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="_create_file_if_needed"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_create_file_if_needed</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="oauth2client.multistore_file-pysrc.html#_MultiStore._create_file_if_needed">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Create an empty file if necessary.

This method will not initialize the file. Instead it implements a
simple version of &quot;touch&quot; to ensure the file has been created.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_locked_json_read"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_locked_json_read</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="oauth2client.multistore_file-pysrc.html#_MultiStore._locked_json_read">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Get the raw content of the multistore file.

The multistore must be locked when this is called.

Returns:
  The contents of the multistore decoded as JSON.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_locked_json_write"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_locked_json_write</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">data</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="oauth2client.multistore_file-pysrc.html#_MultiStore._locked_json_write">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Write a JSON serializable data structure to the multistore.

The multistore must be locked when this is called.

Args:
  data: The data to be serialized and written.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_refresh_data_cache"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_refresh_data_cache</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="oauth2client.multistore_file-pysrc.html#_MultiStore._refresh_data_cache">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Refresh the contents of the multistore.

The multistore must be locked when this is called.

Raises:
  NewerCredentialStoreError: Raised when a newer client has written the
    store.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_decode_credential_from_json"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_decode_credential_from_json</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">cred_entry</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="oauth2client.multistore_file-pysrc.html#_MultiStore._decode_credential_from_json">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Load a credential from our JSON serialization.

Args:
  cred_entry: A dict entry from the data member of our format

Returns:
  (key, cred) where the key is the key tuple and the cred is the
    OAuth2Credential object.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_write"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_write</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="oauth2client.multistore_file-pysrc.html#_MultiStore._write">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Write the cached data back out.

The multistore must be locked.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_get_credential"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_get_credential</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">client_id</span>,
        <span class="sig-arg">user_agent</span>,
        <span class="sig-arg">scope</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="oauth2client.multistore_file-pysrc.html#_MultiStore._get_credential">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Get a credential from the multistore.

The multistore must be locked.

Args:
  client_id: The client_id for the credential
  user_agent: The user agent for the credential
  scope: A string for the scope(s) being requested

Returns:
  The credential specified or None if not present

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_update_credential"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_update_credential</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">cred</span>,
        <span class="sig-arg">scope</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="oauth2client.multistore_file-pysrc.html#_MultiStore._update_credential">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Update a credential and write the multistore.

This must be called when the multistore is locked.

Args:
  cred: The OAuth2Credential to update/set
  scope: The scope(s) that this credential covers

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_delete_credential"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_delete_credential</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">client_id</span>,
        <span class="sig-arg">user_agent</span>,
        <span class="sig-arg">scope</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="oauth2client.multistore_file-pysrc.html#_MultiStore._delete_credential">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Delete a credential and write the multistore.

This must be called when the multistore is locked.

Args:
  client_id: The client_id for the credential
  user_agent: The user agent for the credential
  scope: The scope(s) that this credential covers

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_get_storage"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_get_storage</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">client_id</span>,
        <span class="sig-arg">user_agent</span>,
        <span class="sig-arg">scope</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="oauth2client.multistore_file-pysrc.html#_MultiStore._get_storage">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Get a Storage object to get/set a credential.

This Storage is a 'view' into the multistore.

Args:
  client_id: The client_id for the credential
  user_agent: The user agent for the credential
  scope: A string for the scope(s) being requested

Returns:
  A Storage object that can be used to get/set this cred

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Tue Nov  6 12:07:16 2012
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
